1. Field of the Invention
This invention relates generally to dynamically extending XML-based remote service by clients and particularly to extending Service Data Objects (SDO)-based remote service from client.
2. Description of Background
XML-based service use Extensible Markup Language (XML) to describe the data passed in and out from the interface. The structure of the XML is defined by XML Schema Definition (XSD). For example, SDO-based services use service data objects as their input and output parameters. The structure of the data service object is defined by XSD.
SDO is a data programming specification that complements existing Java 2 Enterprise Edition (J2EE) technologies and enables service-oriented architectures by providing uniform data access for a wide variety of service and resource types. Not only does SDO enable a consistent approach to data access, but it also provides features that simplify common application tasks, such as allowing data browsing and updating while the application is disconnected from the data source. SDOs are designed to simplify and unify the way applications handle data. By using SDOs, application programmers can uniformly access and manipulate data from heterogeneous data sources, including relational databases, XML data sources, Web services, and other such enterprise information systems. Since SDO provides a single data access API (Application Program Interface), developers can choose the framework that best fits an application without learning to use different APIs for every application.
Eclipse Modeling Framework (EMF) is based on a data model defined using Java interfaces, XML Schema, or UML class diagrams, EMF will generate a unifying meta model (called Ecore) which in conjunction with the framework can be used to create a high-quality implementation of the model. IBM's reference implantation of SDO is based on EMF. In this implementation, the XSD needs to load into memory and registered in the Java Virtual Machine (JVM) as Ecore model before the SDO can be created. Ecore model is represented in Java as schema packages (org.eclipse.emf.ecore.EPackage).
The behavior and capability of XML-based service can be extended by extending the interface schema. There are applications which require the schema to be extended by clients dynamically. “Remote” means the client and the service are running in different JVMs. “Dynamically” means the service does not need to restart to support the extension. For SDO-based remote service, this means once the schema (Ecore model) is extended, it needs to re-register the schema on both client and server side.
There a several challenges to achieve this. First, the Ecore model needs to be transferred from server to clients. But Ecore model (schema packages) is not serializable. In other words, the schema packages cannot be directly transferred between two JVMs remotely. A second challenge is that every client has to retrieve the schema packages and register the schema packages before calling the server and needs to do this every time the schema packages on server change. This increases the complexity of the client application, making SDO-based remote service difficult to use.
Considering the limitations of the aforementioned methods, it is clear that there is a need for an efficient method for clients to extend SDO-based remote service dynamically.